package com.qfedu.service.impl;

import com.qfedu.entity.OrderDetailEntity;
import com.qfedu.entity.OrderEntity;
import com.qfedu.mapper.OrderDetailPojoMapper;
import com.qfedu.mapper.OrderPojoMapper;
import com.qfedu.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceimpl implements OrderService {
    @Autowired
    private OrderPojoMapper orderPojoMapper;
@Autowired
private OrderDetailPojoMapper orderDetailPojoMapper;

    @Override
    public List<OrderEntity> queryAllorderHou(OrderEntity orderEntity) {
        List<OrderEntity> orderEntities = orderPojoMapper.queryAllorderHou(orderEntity);
        return orderEntities;
    }

    @Override
    public List<OrderEntity> queryOrderById(OrderEntity orderEntity) {
        List<OrderEntity> orderEntities = orderPojoMapper.queryOrderById(orderEntity);
        return orderEntities;
    }

    @Override
    public List<OrderDetailEntity> queryOrderDetail(String oid) {
        List<OrderDetailEntity> orderDetailEntities = orderDetailPojoMapper.queryOrderDetail(oid);
        return orderDetailEntities;
    }
}
